package org.openwork.portlet.skillmanagement.service.persistence;

import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.exception.SystemException;

import org.openwork.portlet.skillmanagement.model.SkillUser;

import java.util.List;


/**
 * <a href="SkillUserUtil.java.html"><b><i>View Source</i></b></a>
 *
 * <p>
 * ServiceBuilder generated this class. Modifications in this class will be
 * overwritten the next time is generated.
 * </p>
 *
 * @author    Samuel Garcia Martinez
 * @see       SkillUserPersistence
 * @see       SkillUserPersistenceImpl
 * @generated
 */
public class SkillUserUtil {
    private static SkillUserPersistence _persistence;

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
     */
    public static void clearCache() {
        getPersistence().clearCache();
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(SkillUser)
     */
    public static void clearCache(SkillUser skillUser) {
        getPersistence().clearCache(skillUser);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
     */
    public long countWithDynamicQuery(DynamicQuery dynamicQuery)
        throws SystemException {
        return getPersistence().countWithDynamicQuery(dynamicQuery);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
     */
    public static List<SkillUser> findWithDynamicQuery(
        DynamicQuery dynamicQuery) throws SystemException {
        return getPersistence().findWithDynamicQuery(dynamicQuery);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
     */
    public static List<SkillUser> findWithDynamicQuery(
        DynamicQuery dynamicQuery, int start, int end)
        throws SystemException {
        return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
     */
    public static SkillUser remove(SkillUser skillUser)
        throws SystemException {
        return getPersistence().remove(skillUser);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
     */
    public static SkillUser update(SkillUser skillUser, boolean merge)
        throws SystemException {
        return getPersistence().update(skillUser, merge);
    }

    public static void cacheResult(
        org.openwork.portlet.skillmanagement.model.SkillUser skillUser) {
        getPersistence().cacheResult(skillUser);
    }

    public static void cacheResult(
        java.util.List<org.openwork.portlet.skillmanagement.model.SkillUser> skillUsers) {
        getPersistence().cacheResult(skillUsers);
    }

    public static org.openwork.portlet.skillmanagement.model.SkillUser create(
        SkillUserPK skillUserPK) {
        return getPersistence().create(skillUserPK);
    }

    public static org.openwork.portlet.skillmanagement.model.SkillUser remove(
        SkillUserPK skillUserPK)
        throws com.liferay.portal.kernel.exception.SystemException,
            org.openwork.portlet.skillmanagement.NoSuchUserException {
        return getPersistence().remove(skillUserPK);
    }

    public static org.openwork.portlet.skillmanagement.model.SkillUser updateImpl(
        org.openwork.portlet.skillmanagement.model.SkillUser skillUser,
        boolean merge)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().updateImpl(skillUser, merge);
    }

    public static org.openwork.portlet.skillmanagement.model.SkillUser findByPrimaryKey(
        SkillUserPK skillUserPK)
        throws com.liferay.portal.kernel.exception.SystemException,
            org.openwork.portlet.skillmanagement.NoSuchUserException {
        return getPersistence().findByPrimaryKey(skillUserPK);
    }

    public static org.openwork.portlet.skillmanagement.model.SkillUser fetchByPrimaryKey(
        SkillUserPK skillUserPK)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().fetchByPrimaryKey(skillUserPK);
    }

    public static java.util.List<org.openwork.portlet.skillmanagement.model.SkillUser> findByUserId(
        long userId) throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findByUserId(userId);
    }

    public static java.util.List<org.openwork.portlet.skillmanagement.model.SkillUser> findByUserId(
        long userId, int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findByUserId(userId, start, end);
    }

    public static java.util.List<org.openwork.portlet.skillmanagement.model.SkillUser> findByUserId(
        long userId, int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByUserId(userId, start, end, orderByComparator);
    }

    public static org.openwork.portlet.skillmanagement.model.SkillUser findByUserId_First(
        long userId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException,
            org.openwork.portlet.skillmanagement.NoSuchUserException {
        return getPersistence().findByUserId_First(userId, orderByComparator);
    }

    public static org.openwork.portlet.skillmanagement.model.SkillUser findByUserId_Last(
        long userId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException,
            org.openwork.portlet.skillmanagement.NoSuchUserException {
        return getPersistence().findByUserId_Last(userId, orderByComparator);
    }

    public static org.openwork.portlet.skillmanagement.model.SkillUser[] findByUserId_PrevAndNext(
        SkillUserPK skillUserPK, long userId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException,
            org.openwork.portlet.skillmanagement.NoSuchUserException {
        return getPersistence()
                   .findByUserId_PrevAndNext(skillUserPK, userId,
            orderByComparator);
    }

    public static java.util.List<org.openwork.portlet.skillmanagement.model.SkillUser> findBySkillId(
        long skillId)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findBySkillId(skillId);
    }

    public static java.util.List<org.openwork.portlet.skillmanagement.model.SkillUser> findBySkillId(
        long skillId, int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findBySkillId(skillId, start, end);
    }

    public static java.util.List<org.openwork.portlet.skillmanagement.model.SkillUser> findBySkillId(
        long skillId, int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findBySkillId(skillId, start, end, orderByComparator);
    }

    public static org.openwork.portlet.skillmanagement.model.SkillUser findBySkillId_First(
        long skillId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException,
            org.openwork.portlet.skillmanagement.NoSuchUserException {
        return getPersistence().findBySkillId_First(skillId, orderByComparator);
    }

    public static org.openwork.portlet.skillmanagement.model.SkillUser findBySkillId_Last(
        long skillId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException,
            org.openwork.portlet.skillmanagement.NoSuchUserException {
        return getPersistence().findBySkillId_Last(skillId, orderByComparator);
    }

    public static org.openwork.portlet.skillmanagement.model.SkillUser[] findBySkillId_PrevAndNext(
        SkillUserPK skillUserPK, long skillId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException,
            org.openwork.portlet.skillmanagement.NoSuchUserException {
        return getPersistence()
                   .findBySkillId_PrevAndNext(skillUserPK, skillId,
            orderByComparator);
    }

    public static java.util.List<org.openwork.portlet.skillmanagement.model.SkillUser> findAll()
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findAll();
    }

    public static java.util.List<org.openwork.portlet.skillmanagement.model.SkillUser> findAll(
        int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findAll(start, end);
    }

    public static java.util.List<org.openwork.portlet.skillmanagement.model.SkillUser> findAll(
        int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findAll(start, end, orderByComparator);
    }

    public static void removeByUserId(long userId)
        throws com.liferay.portal.kernel.exception.SystemException {
        getPersistence().removeByUserId(userId);
    }

    public static void removeBySkillId(long skillId)
        throws com.liferay.portal.kernel.exception.SystemException {
        getPersistence().removeBySkillId(skillId);
    }

    public static void removeAll()
        throws com.liferay.portal.kernel.exception.SystemException {
        getPersistence().removeAll();
    }

    public static int countByUserId(long userId)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().countByUserId(userId);
    }

    public static int countBySkillId(long skillId)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().countBySkillId(skillId);
    }

    public static int countAll()
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().countAll();
    }

    public static SkillUserPersistence getPersistence() {
        if (_persistence == null) {
            _persistence = (SkillUserPersistence) PortletBeanLocatorUtil.locate(org.openwork.portlet.skillmanagement.service.ClpSerializer.SERVLET_CONTEXT_NAME,
                    SkillUserPersistence.class.getName());
        }

        return _persistence;
    }

    public void setPersistence(SkillUserPersistence persistence) {
        _persistence = persistence;
    }
}
